﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text;
using System.Globalization;
using BlueLotus7.Common;

namespace BlueLotus7.Web
{
    public class CalendarEvent : IIdentifiable
    {
        private bool isFulldayEvent = false;

        public Guid Key
        {
            get;
            set;
        }

        public string Identity
        {
            get;
            set;
        }

        public CalendarEventType Type
        {
            get;
            set;
        }

        public DateTime startStamp
        {
            get;
            set;
        }

        public DateTime endStamp
        {
            get;
            set;
        }

        public bool IsFulldayEvent
        {
            get
            {
                return isFulldayEvent;
            }
        }

        public string Summary
        {
            get;
            set;
        }

        public string Color
        {
            get;
            set;
        }

        public Guid? OwnerId
        {
            get;
            set;
        }

        public string OwnerIdentity
        {
            get;
            set;
        }

        #region Constructors

        public CalendarEvent(DateTime startStamp, DateTime endStamp)
        {
            this.startStamp = startStamp;
            this.endStamp = endStamp;
            this.isFulldayEvent = false;
        }

        public CalendarEvent(DateTime day)
        {
            this.isFulldayEvent = true;
            this.startStamp = this.endStamp = day;
        }

        public CalendarEvent(int year, int month, int day)
        {
            this.isFulldayEvent = true;
            this.startStamp = this.endStamp = new DateTime(year, month, day);
        }

        #endregion
    }
}